<?php
	namespace org\kahikai\database\mysql;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Cp1252"/>
<meta name="author" content="Ch4mp"/>
<link rel="shortcut icon" href="../../../../../favicon.ico" type="image/x-icon"/> 
<link rel="icon" href="../../../../../favicon.ico" type="image/x-icon"/>
<title>MysqlUserDao test</title>
</head>
<body>
<?php
	require_once '../../../../../org/kahikai/database/mysql/MysqlUserDao.php';
	use org\kahikai\database\mysql\MysqlUserDao;
	
	$userDao = new MysqlUserDao();
	
	echo "<h1>getByEmail('ch4mp@c4-soft.com')</h1>\n";
	$user = $userDao->getByEmail('ch4mp@c4-soft.com');
	var_dump($user);
	
	echo "<h1>update($user->id)</h1>\n";
	$tmp = $user->confirmationNumber;
	$user->confirmationNumber = null;
	var_dump($userDao->update($user));
	$user->confirmationNumber = $tmp;
	var_dump($userDao->update($user));
	
	echo "<h1>getById(1)</h1>\n";
	$user = $userDao->getById(1);
	var_dump($user);
?>
</body>
</html>